<template>
  <Card :title="mov.title" :loading="mov.loading">
    <img
      :src="mov.imageUrl"
      :style="{ width, height, cursor: 'pointer' }"
      @click="handleChange(mov.url)"
    />
  </Card>
</template>
<script lang="ts" setup>
  import { PropType } from 'vue';
  import { Card } from 'ant-design-vue';

  defineProps({
    mov: null,
    width: {
      type: String as PropType<string>,
      default: '100%',
    },
    height: {
      type: String as PropType<string>,
      default: '100%',
    },
  });

  function handleChange(url: string) {
    console.log(url);
    window.open(url, '_blank');
  }
</script>
